/**************************************************************************
 *         Copyright(c) 2007 by Sunplus mMedia  Technology Co., Ltd.       *
 *                                                                         *
 *  This software is copyrighted by and is the property of Sunplus mMedia  *
 *  Technology Co., Ltd. All rights are reserved by Sunplus mMedia Techno- *
 *  logy Co., Ltd. This software may only be used in accordance with the   *
 *  corresponding license agreement. Any unauthorized use, duplication,    *
 *  distribution, or disclosure of this software is expressly forbidden.   *
 *                                                                         *
 *  This Copyright notice "M U S T" not be removed or modified without     *
 *  prior written consent of Sunplus mMedia Technology  Co., Ltd.          *
 *                                                                         *
 *  Sunplus mMedia Technology Co., Ltd. reserves the right to modify this  *
 *  software without notice.                                               *
 *                                                                         *
 *  Sunplus mMedia Technology Co., Ltd.                                    *
 *  19-1, Innovation First Road, Science-Based Industrial Park,            *
 *  Hsin-Chu, Taiwan, R.O.C.                                               *
 *                                                                         *
 **************************************************************************/
#ifndef __PB_API_H__
#define __PB_API_H__

//=============================================================================
//Header file
//=============================================================================
#include "pb_general.h"
#include "spe_distort.h"

//=============================================================================
//Symbol
//=============================================================================
#define SLIDE_PLAY		1
#define SLIDE_STOP		0

//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//Data type
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//Function Prototype
//------------------------------------------------------------------------------
void pbInit(void);
UINT8 pbParamSet(UINT8 paraId, UINT16 value);
UINT16 pbParamGet(UINT8 paraId);
void pbDispInit(UINT32 srcAddr, UINT16 srcHSize, UINT16 srcVSize);
UINT16 pbFileCntGet(void);
UINT8 pbFileInfoGet(UINT16 FileIndex, PBFile_t* FileInfo);
UINT8 pbSingleImgPlay(UINT16 FileIndex);
UINT8 pbVideoFramePlay(UINT16 FileIndex);
UINT32 pbDispBuffGet(UINT8 opt);
UINT32 pbDispBuffSwitch(void);
UINT8 pbImgDecode(PBFile_t* pFile, UINT32 DecBuff, UINT8 DecOpt);
UINT8 pbMultiPlayLayoutInit(UINT8 LayoutType, UINT16 FileIndex);
void pbMultiPlay(void);
UINT8 pbMultiPlayShift(UINT16* fileIdx, UINT8 shift);
void pbMultiPlayObjFrameDraw(UINT16 idx, UINT8 enable);
void pbDZoomFactorSet(UINT16 Factor);
UINT32 pbFreeBuffGet(void);
void pbDecodeSizeGet(UINT16* Width, UINT16* Height);
void pbDecodeSizeSet(UINT16 Width, UINT16 Height);
UINT8 pbImgDeCmp(struct Exif_Decompress_Parameter* ImagePara, UINT32 DecBuff, UINT8 ImgType);
UINT8 pbVoiceMemoCheck(UINT16 FileIndex);
void pbBufAddrSet(UINT32 addr);
void pbBufAddrGet(UINT32* addr);
void pbBufHsizeSet(UINT16 width);
UINT8 pbImgResize(PBFile_t* pFile, UINT16 dstWidth, UINT16 dstHeight);
UINT8 pbEffectSet(PBFile_t* pFile, PBEffectList_t imgEffect);
UINT8 pbFilePlayFadeIn(UINT16 Time);
UINT32 pbUserStartImgGet(UINT32 *vlcAddr);
UINT8 pbImgPanSet(SINT16 stepX, SINT16 stepY);
UINT8 pbDZoomStart(void);
UINT8 pbDecRotModeGet(void);
UINT8 pbImgDeCmpRot(struct Exif_Decompress_Parameter* ImagePara, Pb_Dec_Parameter* DecPara);
UINT16 pbExifOrientGet(void);
UINT8 pbImgRotate(PBFile_t* pFile);
UINT8 pbSlideShowStart(void);
UINT8 pbSlideShowAbort(void);
#define pbSlideShowStop pbSlideShowAbort
UINT8 pbSlideShowContinue(void);
UINT8 pbSlideShowStateGet(void);
void pbSlideShowStateSet(UINT8 state);
UINT8 pbSlideShowProc(UINT16* FileIndex);
void pbDZoomPause(void);
void pbFillBlack(UINT32 dstAddr, UINT16 imgW, UINT16 imgH);
UINT8 decodePhotoFrameImage( UINT32 frameResIdx, UINT32 *decAddr, UINT32 endAddr, UINT16 *frameWidth, UINT16 *frameHeight );

#ifdef MULTI_FOLDER_AS_ONE  //xian ++ 20080806
UINT32 pbFileTotalCntGet();
UINT32 pbFirstFileIndexGet();
#endif
#endif /*__PB_API_H__*/


